package com.example.myapplication

import android.os.Bundle
import android.view.View
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.NavHostFragment
import com.example.myapplication.databinding.FragmentSecondBinding
import com.xinnuo.delegate.viewBinding

class SecondFragment : Fragment(R.layout.fragment_second) {

    private val binding by viewBinding(FragmentSecondBinding::bind)

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)

        binding.btnSecond.setOnClickListener {
            val controller = NavHostFragment.findNavController(this)
            controller.navigate(R.id.action_secondFragment_to_navigation_home)
        }
    }

}